import request from '@/utils/request'


const apl_typicial_Api = {
  getTypicalEnums: '/apl_typical_enum/listAll', // 查询分类
  saveTypicalEnums: '/apl_typical_enum/saveList', // 保存分类
  saveTypical: '/apl_typical_case/save', // 
  conditionQuery: '/apl_typical_case/conditionQuery', // 条件查询
  getTypicalDataByUserId: '/apl_typical_case/getTypicalDataByUserId' // userId查询
}



/**
 * 查询分类
 * @param {} body 
 * @returns 
 */
export function getTypicalEnums () {
  return request({
      url: apl_typicial_Api.getTypicalEnums,
      method: 'post'
  })
}

/**
 * 保存分类
 */
export function saveTypicalEnums(body) {
  return request({
      url: apl_typicial_Api.saveTypicalEnums,
      method: 'post',
      data: body
  })
}

/**
 * 保存数据
 */
export function saveTypical(body) {
  return request({
    url: apl_typicial_Api.saveTypical,
    method: 'post',
    data: body
  })
}

/**
 * 条件查询
 * @param {*} body 
 * @returns 
 */
export function conditionQuery(body) {
  return request({
    url: apl_typicial_Api.conditionQuery,
    method: 'post',
    data: body
  })
}


/**
 * 通过userid查询
 */
export function getTypicalDataByUserId(parameter) {
  return request({
    url: apl_typicial_Api.getTypicalDataByUserId,
    method: 'post',
    params: parameter
  })
}